package rmhc.api.vk 
{
	import com.adobe.images.PNGEncoder;
	import flash.utils.ByteArray;
	import rmhc.api.ApiWrapper;
	import rmhc.api.dataflow.WallPostInfo;
	import rmhc.api.tasks.IApiTask;
	import rmhc.gui.customTrace;
	import rmhc.gui.SupplyFunctions;
	/**
	 * ...
	 * @author mick
	 */
	public class PrepareWallPostTask extends VkApiTask implements IApiTask
	{
		public var url:String;
		public function PrepareWallPostTask( wrapper:ApiWrapper) 
		{
			
			customTrace("PrepareWallPost:PrepareWallPost: photos.getWallUploadServer" );
			super(wrapper, "wall.getPhotoUploadServer" , { } );
		}
		override public function parseData(result:Object):void
		{
			customTrace("PrepareWallPostTask:parseData: upload_url " +result['upload_url']);
			url = result['upload_url'];
			
			(wrapper as VkApi).setWallUploadUrl(url);
			onComplete();
		}
		
	}

}